import { defineStore } from 'pinia'
import { getDetailByHouseid } from '@/services'

export const useDetailStore = defineStore('detail', {
  state: () => ({
    detailArr: {}
  }),
  getters:{
    mainPart(state){
      return state.detailArr?.mainPart
    }
  },
  actions: {
    async fetchDetailByHouseid(houseId) {
      const res = await getDetailByHouseid(houseId)
      this.detailArr = res.data
    },
  }
})

